﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RelightERP.BLL;

public partial class Admin_Default : AdminBasePage
{
    Control ControlBase = null;
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Request.QueryString["menu"] != null)
            {
                //Load User Controls at runtime
                ControlBase = new Control();
                ControlBase = this.LoadControl(String.Format("~/Admin/UserControls/{0}", Convert.ToString(Request.QueryString["menu"])));
                PlaceHolderBase.Controls.Add(ControlBase);
            }
        }
        catch (System.Reflection.ReflectionTypeLoadException loadEx)
        {
            Exception[] exArray = loadEx.LoaderExceptions;
            foreach (Exception ex in exArray)
                Response.Write(ex.StackTrace + "<br /><br />");
        }
    }
}